<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
      <%@ page import="com.exam.domain.*"%>
     <%@ page import="java.util.*"%>
     <%@ page import="app.mybean.*"%>
    <%Student stu= (Student)session.getAttribute("stuinfo"); 
     List<Exam> exam=Manager.getInstance().ListStudentExam(stu.getS_id());
    // System.out.println(exam.size());
     //System.out.println( stu.getS_id());
    %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>E-exam</title>
<link rel="stylesheet" href="2col_leftNav.css" type="text/css" />
<style type="text/css">
<!--
.STYLE2 {font-size: medium}
.STYLE3 {
	color: #334d55;
	font-size: large;
	font-weight: bold;
}
body {
	background-color: #FFFFFF;
}
.STYLE5 {font-family: "宋体"}
-->
</style>
<script type="text/javascript">
	function confirmExam() {
	var x=document.getElementById("test");
alert(x.title);
		}

</script>
</head>
<!-- The structure of this file is exactly the same as 2col_rightNav.html;
     the only difference between the two is the stylesheet they use -->
<body>
<div id="masthead">
  <h1 id="siteName"><img src="e-exam.gif" width="578" height="126" /></h1>
  <div class="relatedLinks" id="globalNav">
    <h1>欢迎来到在线考试中心，<%=stu.getS_name()%>同学</h1>
  </div>
</div>
<!-- end masthead -->
<div id="content">
  <div id="breadCrumb"> <a href="student.html">学生首页</a> / <a href="about.html">关于系统</a> / <a href="about.html">联系我们</a> / </div>
  <h2 id="pageName">考试中心</h2>
  <div class="feature">
 <h2 id="pageName">进入考场<a name="enter" id="enter"></a></h2>
 <table width="651" border="1" cellspacing="5">
   <tr>
     <th id="fg"width="53" >课程编号</th>
     <td width="122">课程名称</td>
     <td width="63">任课教师</td>
     <td width="81">考试时间</td>
     <td width="96">考试时长</td>
     <td width="92">是否开放</td>
     <td width="74">选择进入</td>
   </tr>
      <%
   for(Iterator<Exam> iter=exam.iterator();iter.hasNext();)
   {
   	Exam aexam=iter.next();
    %>
     <form action=<%=aexam.getIsopen()==1?"examServlet":"mockServlet" %> method="get">
   <tr>
     <td ><%=aexam.getCourse_id() %></td>
     <td><%=aexam.getCourse_name() %></td>
     <td><%=aexam.getI_name() %></td>
     <td id="test" title="<%=aexam.getBegin_time() %>" ><%=aexam.getBegin_time() %></td>
     <td><%=aexam.getTime() %></td>
     <td><%=aexam.getIsopen()==1?"已开放":"未开放" %></td>
     <td width="74"><%if(aexam.getIsopen()==1){ %>
<input type="submit" value="进入考试"  />
<input type="hidden" name="exam_id" value="<%=aexam.getExam_id()%>" >
</td><% } else {%>
<input type="submit" value="进入模拟考试"  />
<input type="hidden" name="exam_id" value="<%=aexam.getExam_id()%>" >
<%} %>

   </tr>
   
   </form>
  <%} %>
 </table>

 <p>&nbsp;</p>
<h2 id="pageName">查询考试信息<a name="search" id="search"></a></h2>
 <form id="form2" name="form2" method="post" action="testsearch.html">
   输入查询信息
     <input type="text" name="textfield3" />
   选择查询类别
   <select name="select2">
     <option value="courseID" selected="selected">课程编号</option>
     <option value="courseName">课程名称</option>
   </select>
   <input type="submit" name="Submit2" value="查询" />
 </form>
 <p>&nbsp;</p>
 <h2 id="pageName">模拟考试<a name="moni" id="moni"></a></h2>
 <form id="form1" name="form1" method="post" action="testpage.html">
   <p>输入查询信息
     <input type="text" name="textfield" />
      选择查询类别
      <select name="select">
        <option value="courseID">课程编号</option>
        <option value="courseName">课程名称</option>
      </select>
      <input type="submit" name="Submit" value="模拟考试" />
   </p>
   </form>
 <p>&nbsp;</p>
  </div>
</div>
<!--end content -->
<div id="navBar">
  <div id="search">
    <form action="#">
      <label></label>
    </form>
  </div>
  <div id="sectionLinks">
    <ul>
      <li><a href="#test">在线考试</a></li>
      <li><a href="stu_coursecenter.html">我的课程</a></li>
      <li><a href="#personal">个人设定</a></li>
      <li><a href="index.html">退出</a></li>
    </ul>
  </div>
  <div class="relatedLinks">
    <h3><span class="STYLE2"><img src="title.gif" width="86" height="47" /></span></h3>
    <h3>在线考试<a name="test" id="test"></a></h3>
    <ul>
      <li><a href="#enter">进入考场</a></li>
      <li><a href="#search">查看考试信息</a></li>
      <li><a href="#moni">模拟考试</a></li>
      <li></li>
    </ul>
  </div>
  <div class="relatedLinks">
    <h3><span class="STYLE2"><img src="title.gif" width="86" height="47" /></span></h3>
    <h3>我的课程<a name="course" id="course"></a></h3>
    <ul>
      <li><a href="stu_coursecenter.html">课程查询</a></li>
      <li><a href="stu_coursecenter.html">成绩查询</a></li>
    </ul>
  <ul>
      <li><a href="stu_coursecenter.html">复习知识点</a></li>
    </ul>
  </div>
  <div id="advert"></div>
  <div id="headlines">
    <h3 class="STYLE2"><img src="title.gif" width="86" height="47" /></h3>
    <h3 class="relatedLinks STYLE2">个人设定<a name="personal" id="personal"></a></h3>
    <ul>
      <li class="relatedLinks STYLE2"><a href="stu_code.html">修改密码</a></li>
      <li class="relatedLinks"><span class="STYLE2"><a href="stu_personal.html">信息设定</a></span></li>
    </ul>
    <h3 class="STYLE2">&nbsp;</h3>
    <p><a href="index.html" class="STYLE3"></a></p>
  </div>
</div>
<!--end navbar -->
<div id="siteInfo"> <img src="title.gif" width="90" height="46" /> <a href="about.html">About Us</a> | <a href="about.html">Online Help</a>| <a href="about.html">Contact Us</a> | &copy;2011 E-EXAM.co.ltd </div>
<br />
</body>
</html>
